//
//  PicLabels.m
//  BCNADemo
//
//  Created by 马东朝 on 2018/5/11.
//  Copyright © 2018年 马东朝. All rights reserved.
//

#import "PicLabels.h"

@implementation PicLabels

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        mainFrame = frame;
        [self addSubview:self.pictures];
        [self addSubview:self.textLable];
    }
    return self;
}
- (UIImageView *)pictures{
    if (!_pictures) {
        _pictures = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, mainFrame.size.height, mainFrame.size.height)];
    }
    return _pictures;
}
- (UILabel *)textLable{
    if (!_textLable) {
        _textLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_pictures.frame) , 0, mainFrame.size.width - CGRectGetMaxX(_pictures.frame) - kWidth(30), mainFrame.size.height)];
        _textLable.textColor = [UIColor colorWithHexString:@"#9194a6"];
        _textLable.font = [UIFont systemFontOfSize:kHeight(36)];
        _textLable.textAlignment = NSTextAlignmentRight;
    }
    return _textLable;
}
@end
